#ifndef __LINK_H_
#define __LINK_H_

/*数据结构声明*/
typedef int data_t;
typedef struct linknode link_t;

/*函数声明*/
extern struct linknode *create_link();
extern int ins_head_link(struct linknode *head, const data_t *data);
extern int ins_index_link(struct linknode *head, int index, int data);
extern int del_head_link(struct linknode *head);
extern int del_link_by_index(struct linknode *head, int index);
extern int del_link_by_data(struct linknode *head, const int data);
extern struct linknode * locate_link(struct linknode *head, const data_t *data);
extern struct linknode * locate_link_pre(struct linknode *head, const data_t *data);
extern int change_index_link(struct linknode *head, int index, const data_t *data);
extern int get_index_link(struct linknode *head, int index, data_t *databuf);
extern int is_empty_link(struct linknode *head);
extern int clean_link(struct linknode *head);
extern int des_link(struct linknode **headp);
extern void print_link(struct linknode *head);

#endif
